home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
Libraries
/
TurboTCP 1.0.1
/
TurboTCP.source
/
Telnet.protocol.h
< prev
next >
Wrap
Text File
|
1993-11-02
|
3KB
|
95 lines
/*
** Telnet.protocol.h
**
** TurboTCP support library
** Constants for Telnet protocol interpreter
**
** Copyright © 1993, FrostByte Design / Eric Scouten
**
*/
#pragma once
// set to 1 to eliminate MacTCP & just test the terminal
#define _TestTerminal 0
// Telnet standard keycodes
#ifndef _ASCII
enum { // standard Telnet/ASCII keycodes
charNUL = 0,
charBEL = 7,
charBS,
charHT,
charLF,
charVT,
charFF,
charCR,
charDEL = 127,
charIAC = 255 // interpret as command
};
#define _ASCII 1
#else
#define charIAC 255
#endif
// Telnet escape sequences — these characters have meaning only if preceded by IAC
enum {
escSE = 240, // end of subnegotiation
escNOP, // no-operation
escDM, // data mark (data stream portion of a Synch)
escBRK, // break key
escIP, // interrupt process
escAO, // abort output
escAYT, // are you there?
escEC, // erase character
escEL, // erase line
escGA, // go ahead
escSB, // begin subnegotiation
escWILL,
escWONT,
escDO,
escDONT,
escIAC // data byte 255
};
// Telnet option codes
enum {
optTRANSMIT_BINARY = 0, // RFC 856: Telnet binary transmission
optECHO = 1, // RFC 857: Telnet echo option
optSUPPRESS_GO_AHEAD = 3, // RFC 858: Telnet suppress go ahead option
optSTATUS = 5, // RFC 859: Telnet status option
optTIMING_MARK = 6, // RFC 860: Telnet timing mark option
optRCTE = 7, // RFC 726: Remote controlled transmssion and echoing telnet option
optLOGOUT = 18, // RFC 727: Telnet logout option
optBM = 19, // RFC 735: Revised Telnet byte macro option
optDET = 20, // RFC 732: Telnet data entry terminal option
optSUPDUP = 21, // RFC 736: Telnet SUPDUP option
optSUPDUP_OUTPUT = 22, // RFC 749: Telnet SUPDUP output option
optSEND_LOCATION = 23, // RFC 779: Telnet send location option
optTERMINAL_TYPE = 24, // RFC 1091: Telnet terminal type option
optEND_OF_RECORD = 25, // RFC 885: Telnet end of record option
optTUID = 26, // RFC 927: TACACS user identification telnet option
optOUTMRK = 27, // RFC 933: Output marking Telnet option
optTTYLOC = 28, // RFC 946: Telnet terminal location number option
opt3270_REGIME = 29, // RFC 1041: Telnet 3270 regime option
optX_3_PAD = 30, // RFC 1053: Telnet X.3 pad option
optNAWS = 31, // RFC 1073: Telnet window size option
optTERMINAL_SPEED = 32, // RFC 1079: Telnet terminal speed option
optTOGGLE_FLOW_CONTROL = 33, // RFC 1372: Telnet remote flow control option
optLINEMODE = 34, // RFC 1184: Telnet linemode option
optX_DISPLAY_LOCATION = 35, // RFC 1096: Telnet X display location option
optENVIRON = 36, // RFC 1408: Telnet environment option
optAUTHENTICATION = 37, // RFC 1416: Telnet authentication option
optEXOPL = 255 // RFC 861: Telnet extended options-list option
};